package com.lagou.minicat.servlet;

/**
 * @ClassName HttpServlet
 * @Description
 * @Author playboy
 * @Date 2021/5/22 1:54 下午
 * @Version 1.0
 **/
public abstract class HttpServlet implements Servlet {


	public abstract void doGet(Request request, Response response);

	public abstract void doPost(Request request, Response response);

	@Override
	public void service(Request request, Response response) {
		if (request.getMethod().equals(Request.Method.GET)) {
			doGet(request, response);
		} else {
			doPost(request, response);
		}
	}

	@Override
	public void init() {

	}

	@Override
	public void destory() {

	}
}
